Integrand size = 21, antiderivative size = 79 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \, dx=\frac {1}{2} a \left (a^2+6 b^2\right ) x+\frac {b^3 \text {arctanh}(\sin (c+d x))}{d}+\frac {5 a^2 b \sin (c+d x)}{2 d}+\frac {a^2 \cos (c+d x) (a+b \sec (c+d x)) \sin (c+d x)}{2 d} \]
1/2*a*(a^2+6*b^2)*x+b^3*arctanh(sin(d*x+c))/d+5/2*a^2*b*sin(d*x+c)/d+1/2*a ^2*cos(d*x+c)*(a+b*sec(d*x+c))*sin(d*x+c)/d
Time = 0.36 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.33 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \, dx=\frac {2 a \left (a^2+6 b^2\right ) (c+d x)-4 b^3 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 b^3 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 a^2 b \sin (c+d x)+a^3 \sin (2 (c+d x))}{4 d} \]
(2*a*(a^2 + 6*b^2)*(c + d*x) - 4*b^3*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/ 2]] + 4*b^3*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + 12*a^2*b*Sin[c + d* x] + a^3*Sin[2*(c + d*x)])/(4*d)
Time = 0.56 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.01, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 4328, 3042, 4535, 24, 3042, 4533, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^3}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 4328 |
\(\displaystyle \frac {1}{2} \int \cos (c+d x) \left (2 \sec ^2(c+d x) b^3+5 a^2 b+a \left (a^2+6 b^2\right ) \sec (c+d x)\right )dx+\frac {a^2 \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int \frac {2 \csc \left (c+d x+\frac {\pi }{2}\right )^2 b^3+5 a^2 b+a \left (a^2+6 b^2\right ) \csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {a^2 \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))}{2 d}\) |
\(\Big \downarrow \) 4535 |
\(\displaystyle \frac {1}{2} \left (\int \cos (c+d x) \left (2 \sec ^2(c+d x) b^3+5 a^2 b\right )dx+a \left (a^2+6 b^2\right ) \int 1dx\right )+\frac {a^2 \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))}{2 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{2} \left (\int \cos (c+d x) \left (2 \sec ^2(c+d x) b^3+5 a^2 b\right )dx+a x \left (a^2+6 b^2\right )\right )+\frac {a^2 \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\int \frac {2 \csc \left (c+d x+\frac {\pi }{2}\right )^2 b^3+5 a^2 b}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+a x \left (a^2+6 b^2\right )\right )+\frac {a^2 \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))}{2 d}\) |
\(\Big \downarrow \) 4533 |
\(\displaystyle \frac {1}{2} \left (2 b^3 \int \sec (c+d x)dx+a x \left (a^2+6 b^2\right )+\frac {5 a^2 b \sin (c+d x)}{d}\right )+\frac {a^2 \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (2 b^3 \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+a x \left (a^2+6 b^2\right )+\frac {5 a^2 b \sin (c+d x)}{d}\right )+\frac {a^2 \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))}{2 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {1}{2} \left (a x \left (a^2+6 b^2\right )+\frac {5 a^2 b \sin (c+d x)}{d}+\frac {2 b^3 \text {arctanh}(\sin (c+d x))}{d}\right )+\frac {a^2 \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))}{2 d}\) |
(a^2*Cos[c + d*x]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(2*d) + (a*(a^2 + 6*b ^2)*x + (2*b^3*ArcTanh[Sin[c + d*x]])/d + (5*a^2*b*Sin[c + d*x])/d)/2
3.5.71.3.1 Defintions of rubi rules used
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_), x_Symbol] :> Simp[a^2*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m - 2)* ((d*Csc[e + f*x])^n/(f*n)), x] - Simp[1/(d*n) Int[(a + b*Csc[e + f*x])^(m - 3)*(d*Csc[e + f*x])^(n + 1)*Simp[a^2*b*(m - 2*n - 2) - a*(3*b^2*n + a^2* (n + 1))*Csc[e + f*x] - b*(b^2*n + a^2*(m + n - 1))*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f}, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 2] && ((Int egerQ[m] && LtQ[n, -1]) || (IntegersQ[m + 1/2, 2*n] && LeQ[n, -1]))
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[A*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*m)), x] + Simp[(C*m + A*(m + 1))/(b^2*m) Int[(b*Csc[e + f*x])^(m + 2), x], x] /; Fr eeQ[{b, e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && LeQ[m, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]* (B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.)), x_Symbol] :> Simp[B/b Int[(b*Cs c[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x]^2) , x] /; FreeQ[{b, e, f, A, B, C, m}, x]
Time = 0.54 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.92
method | result | size |
derivativedivides | \(\frac {a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 a^{2} b \sin \left (d x +c \right )+3 a \,b^{2} \left (d x +c \right )+b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(73\) |
default | \(\frac {a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 a^{2} b \sin \left (d x +c \right )+3 a \,b^{2} \left (d x +c \right )+b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(73\) |
parallelrisch | \(\frac {2 a^{3} x d +12 a \,b^{2} d x +12 a^{2} b \sin \left (d x +c \right )+a^{3} \sin \left (2 d x +2 c \right )+4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b^{3}-4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b^{3}}{4 d}\) | \(81\) |
risch | \(\frac {a^{3} x}{2}+3 a \,b^{2} x -\frac {3 i a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {3 i a^{2} b \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {a^{3} \sin \left (2 d x +2 c \right )}{4 d}\) | \(111\) |
norman | \(\frac {\left (\frac {1}{2} a^{3}+3 a \,b^{2}\right ) x +\left (\frac {1}{2} a^{3}+3 a \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (-a^{3}-6 a \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\frac {a^{2} \left (a +6 b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {a^{2} \left (a -6 b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}+\frac {3 a^{2} \left (a -2 b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {3 a^{2} \left (a +2 b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2} \left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+\frac {b^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {b^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(230\) |
1/d*(a^3*(1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c)+3*a^2*b*sin(d*x+c)+3*a* b^2*(d*x+c)+b^3*ln(sec(d*x+c)+tan(d*x+c)))
Time = 0.27 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.91 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \, dx=\frac {b^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) - b^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (a^{3} + 6 \, a b^{2}\right )} d x + {\left (a^{3} \cos \left (d x + c\right ) + 6 \, a^{2} b\right )} \sin \left (d x + c\right )}{2 \, d} \]
1/2*(b^3*log(sin(d*x + c) + 1) - b^3*log(-sin(d*x + c) + 1) + (a^3 + 6*a*b ^2)*d*x + (a^3*cos(d*x + c) + 6*a^2*b)*sin(d*x + c))/d
\[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{3} \cos ^{2}{\left (c + d x \right )}\, dx \]
Time = 0.20 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.96 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \, dx=\frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3} + 12 \, {\left (d x + c\right )} a b^{2} + 2 \, b^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 12 \, a^{2} b \sin \left (d x + c\right )}{4 \, d} \]
1/4*((2*d*x + 2*c + sin(2*d*x + 2*c))*a^3 + 12*(d*x + c)*a*b^2 + 2*b^3*(lo g(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 12*a^2*b*sin(d*x + c))/d
Time = 0.32 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.73 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \, dx=\frac {2 \, b^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, b^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + {\left (a^{3} + 6 \, a b^{2}\right )} {\left (d x + c\right )} - \frac {2 \, {\left (a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
1/2*(2*b^3*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 2*b^3*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + (a^3 + 6*a*b^2)*(d*x + c) - 2*(a^3*tan(1/2*d*x + 1/2*c)^3 - 6*a^2*b*tan(1/2*d*x + 1/2*c)^3 - a^3*tan(1/2*d*x + 1/2*c) - 6*a^2*b*tan (1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^2)/d
Time = 13.59 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.56 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \, dx=\frac {a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,b^3\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {a^3\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {3\,a^2\,b\,\sin \left (c+d\,x\right )}{d}+\frac {6\,a\,b^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \]